#ifndef _colour_h
#define _colour_h

#include <SDL/SDL.h>

#define NO_COLOUR   (colourInt(0xFFFFFFFF))

union colour_t {
	Uint32 value;
	struct {
		Uint8 b;
		Uint8 g;
		Uint8 r;
		Uint8 x;
	} rgb;
};

inline colour_t colourInt(Uint32 num) {
	colour_t c = {num};
	return c;
}

inline SDL_Color colourToSDL(colour_t colour) {
	SDL_Color ret = {colour.rgb.r, colour.rgb.g, colour.rgb.b, colour.rgb.x};
	return ret;
}

#endif
/* vim:set ts=2 sts=2 sw=2 noexpandtab: */
